package org.csu.lestore.api.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.csu.lestore.api.common.CommonResponse;
import org.csu.lestore.api.entity.OrderItem;
import org.csu.lestore.api.entity.Orders;
import org.csu.lestore.api.vo.OrderVO;

public interface OrderService {
    CommonResponse<Orders> insertOrder(Orders order);
    CommonResponse<OrderItem> insertOrderItem(OrderItem orderItem);
    CommonResponse<Orders> deleteOrder(int orderId);
    CommonResponse<OrderItem> deleteOrderItemByOrderId(int orderId);
    CommonResponse<OrderVO> getOrder(int orderId);
    CommonResponse<Orders> setOrderState(int orderId,char orderState);
    CommonResponse<Orders> updateOrder(Orders orders);
    CommonResponse<IPage<OrderVO>> getOrderListInPage(int curPage, int size);
    CommonResponse<IPage<OrderVO>> getOrderListInPage(int curPage, int size,int userId);
    CommonResponse<IPage<OrderItem>> getOrderItemListInPage(int curPage, int size,int orderId);
}
